package main

import (
	"go_learn/gopl/ch8/utils"
	"log"
	"net"
	"os"
)

func main() {
	dial, err := net.Dial("tcp", "localhost:8080")
	if err != nil {
		log.Fatal(err)
	}
	defer dial.Close()
	go utils.MustCopy(os.Stdout, dial)
	utils.MustCopy(dial, os.Stdin)
}
